package com.lyz.dataStructure.algorithm.哔哩哔哩2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 18:57
 * @Description:
 **/


import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/20 18:57
 *@Description:
 **/
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] st = s.split(",");
        long[] nums = new long[st.length];
        for(int i =0;i<nums.length;i++){
            nums[i] = Integer.parseInt(st[i]);
        }
        System.out.println(PrintMinNumber(nums));
    }

    public static String PrintMinNumber(long[] numbers){
        String str = " ";
        for(int i =0;i<numbers.length;i++){
            for(int j =i+1;j<numbers.length;j++){
                int a =Integer.valueOf(numbers[i]+""+numbers[j]);
                int b = Integer.valueOf(numbers[j]+""+numbers[i]);
                if(a>b){
                    long t =numbers[i];
                    numbers[i] = numbers[j];
                    numbers[j] = t;
                }
            }
        }
        for(int i =0;i<numbers.length;i++){
            str+=String.valueOf(numbers[i]);
        }
        return str.trim();
    }
}
